package pl.koziolekweb.szkola.QZBuffImagWrite;

// QZ-BuffImagWrite/MyPanel.java
 
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.image.BufferedImage;
import javax.swing.JPanel;

class MyPanel extends JPanel {

    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private BufferedImage im;

    MyPanel(BufferedImage im) {
        this.im = im;
        setPreferredSize(
            new Dimension(im.getWidth(),
                          im.getHeight()));
    }

    @Override
    public void paintComponent(Graphics g) {
        Images.setAntialiasing(g);
        super.paintComponent(g);
        g.drawImage(im,0,0,this);
    }
}